package com.gt.notify;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.gt.entity.project.Project;
import com.gt.entity.projectJsdebug.ProjectJsdebug;
import com.gt.entity.projectJsdebugDetails.ProjectJsdebugDetails;
import com.gt.service.debug.DebugService;
import com.gt.service.project.ProjectService;
import com.gt.service.projectJsdebug.ProjectJsdebugService;
import com.gt.service.projectJsdebugDetails.ProjectJsdebugDetailsService;
import com.gt.service.user.UserService;
import com.gt.utils.HttpHelper;
import eu.bitwalker.useragentutils.UserAgent;
import org.apache.commons.lang.StringUtils;
import org.apache.log4j.Logger;
import org.jsoup.Jsoup;
import org.springframework.mail.javamail.JavaMailSender;

import java.io.IOException;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * bug 添加 测试邮件通知
 */
public class TestNotifyAndAdd implements Runnable{
    private static Logger logger = Logger.getLogger(TestNotifyAndAdd.class);
    private HashMap msg;
    private DebugService debugService;

    public TestNotifyAndAdd(HashMap msg, DebugService debugService) {
        this.msg = msg;
        this.debugService = debugService;
    }

    @Override
    public void run() {
        //数据持久化
        try {
            debugService.add(msg);
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}
